package com.copa.module.user.mapper;

import com.copa.module.user.domain.dto.AddressDto;
import com.copa.module.user.domain.dto.UserAddressDto;
import com.copa.module.user.domain.entity.UserAddressEntity;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author copa
 * @createDate 2021-01-09
 * @function t_user_address表 Mapper 接口
 */
@Mapper
public interface UserAddressDao extends BaseMapper<UserAddressEntity> {

    List<AddressDto> findAddressDtoByUserId(@Param("userId") Long userId);

    UserAddressDto findUserAddressByUserIdAndAddressId(@Param("userId") Long userId, @Param("addressId") Long addressId);
}
